<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>提交预约</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weui.css" />
    <link rel="stylesheet" href="/node_modules/LobsterUIFrame/weui/css/weuix.css" />
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.min.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/zepto.weui.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/swipe.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/macy.js"></script>
    <script src="/node_modules/LobsterUIFrame/weui/js/php.js"></script>
    <script src="/lobstersdk/lobster.js"></script>
    <script src="/jslib/template-web.js"></script>


</head>

<body ontouchstart>
    <div class="page-bd">
        <a href="javascript:;" class="weui-btn weui-btn_primary test">支付</a>
    </div>
</body>

</html>

<script>
    var controller = {
        data: {


        },
        initpage() {
            this.initevent();
        },
        initevent() {
            var self = this;

            $(document).on("click", ".test", function () {
                // console.log(self.data.selectpatient);
                // console.log(self.data.recordinfo);
                self.test();
            })
        },
        initdata() {

        },
        inittemp(tempid, _id, data) {
            var html = template(tempid, data);
            $("#" + _id).html(html);
        },

        test() {
            // var self = this; 
            // var  data={};
            // data.CardType =1;
            // data.CardNum="168511";
            // data.DeptId="1067";
            // data.DoctId="209";
            // data.Regid="19178";
            // data.Timeid="2";
            // data.TranSerNo="12312312312312312";
            // data.PayTime="2022-05-12 15:01:00";
            // data.PayMode="1";
            // data.RegDate="2022-05-12";
            // data.TotalRegFee="0.01";
            // lobsterh5.POST("/lowcode/APP20220421091837536/?appid=3223&view=layui&fun=his.register", data).then(res => {
            //     console.log(res); 

            // }).catch(res => {
            //     console.log(res);
            // })

            lobsterh5.CALLOUTSERVICE("basic.dept.getdept", {
                workid:2052,
                branchId:1
            }).then(res => {
                console.log(res)
            }).catch(res => {
                $.toast(res.msg, 'forbidden');
            });
        },
    }

    $(function () {
        controller.initpage();
    })

</script>
<script type="text/template" id="tpldocinfo">
    <a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">
        <div class="weui-media-box__hd">
            <img class="weui-media-box__thumb" src="{{ImgUrl}}" alt="">
        </div>
        <div class="weui-media-box__bd">
            <h4 class="weui-media-box__title">{{DocName}}</h4>
            <p class="weui-media-box__desc">{{DeptNames}}</p>
        </div>
    </a> 
</script>
<script type="text/template" id="tplrecord">

        <!-- <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>就诊院区：</p>
            </div>
            <div class="weui-cell__ft">{{BranchHospitalName}}</div>
        </div> -->
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊科室：</p>
    </div>
    <div class="weui-cell__ft">{{deptname}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>科室地址：</p>
    </div>
    <div class="weui-cell__ft">{{DeptAddress}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊日期：</p>
    </div>
    <div class="weui-cell__ft">{{regdate}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>就诊时间：</p>
    </div>
    <div class="weui-cell__ft">{{week}}{{schedtype==1?"上午":"下午"}}{{range}}</div>
</div>
<div class="weui-cell">
    <div class="weui-cell__bd">
        <p>费用：</p>
    </div>
    <div class="weui-cell__ft">￥{{regfee}}</div>
</div>

</script>

<script id="tplpatient" type="text/html">
    <ul>
        {{each list }}
            {{if($index==0)}}
            <li class="active patientLi" data-info="{{$value}}">
                {{$value.Name}}
            </li>
            {{else}}
            <li class="patientLi" data-info="{{$value}}">
                {{$value.Name}}
            </li>
            {{/if}}
        {{/each}}
    </ul>
</script>
<script id="tplcard" type="text/html">
    {{if(list.length>0)}}
    {{each list }}
        <a class="weui-cell weui-cell_access carditem" href="javascript:;" data-info="{{$value}}">
            <div class="weui-cell__bd">
                <p> {{$value.Name}} : {{$value.CardNo}}</p>
            </div> 
        </a>
    {{/each}}
   
    {{else}}
        <a class="weui-cell weui-cell_access bindcard" href="javascript:;" >
            <div class="weui-cell__bd" >
                <p style="display: flex; align-items: center;" > 暂无符合要求的卡片，去绑卡</p>
            </div> 
        </a>
    {{/if}}
</script>